﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.franchise.data {
    import flash.utils.*;
    import Classes.util.*;
    import __AS3__.vec.*;

    public class FranchiseData {

        private var m_ownedFranchises:Vector.<OwnedFranchiseData>;
        private var m_friendFranchises:Dictionary;

        public function FranchiseData(_arg1:Vector.<OwnedFranchiseData>, _arg2:Dictionary){
            this.m_ownedFranchises = _arg1;
            this.m_friendFranchises = _arg2;
        }
        public static function loadObject(_arg1:Object):FranchiseData{
            var _local3:Array;
            var _local4:int;
            var _local5:Vector.<OwnedFranchiseData>;
            var _local6:int;
            var _local7:Array;
            var _local8:Dictionary;
            var _local9:String;
            var _local10:String;
            var _local11:Object;
            var _local12:Dictionary;
            var _local13:String;
            var _local14:Object;
            var _local15:FriendFranchiseData;
            var _local2:FranchiseData;
            if (_arg1){
                _local3 = _arg1["owned_franchises"];
                _local4 = _local3.length;
                _local5 = new Vector.<OwnedFranchiseData>(_local4);
                _local6 = 0;
                while (_local6 < _local4) {
                    _local5[_local6] = OwnedFranchiseData.loadObject(_local3[_local6]);
                    _local6++;
                };
                _local7 = _arg1["friend_franchises"];
                _local8 = new Dictionary();
                for (_local9 in _local7) {
                    _local10 = GameUtil.formatServerUid(_local9);
                    _local11 = _local7[_local9];
                    _local12 = new Dictionary();
                    for (_local13 in _local11) {
                        _local14 = _local11[_local13];
                        _local15 = FriendFranchiseData.loadObject(_local14);
                        _local12[_local13] = _local15;
                    };
                    _local8[_local10] = _local12;
                };
                _local2 = new FranchiseData(_local5, _local8);
            };
            return (_local2);
        }

        public function get ownedFranchises():Vector.<OwnedFranchiseData>{
            return (this.m_ownedFranchises);
        }
        public function get friendFranchises():Dictionary{
            return (this.m_friendFranchises);
        }

    }
}//package Modules.franchise.data 
